﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_ModifyUser.aspx.cs" Inherits="Master_Admin_ModifyUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>修改用户信息</title>
    <script src="../Script/province.aspx"></script>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
<%--    <script type="text/javascript">
        $(document).ready(function() {
            $.formValidator.initConfig({ alertmessage: false, formid: "netmu_Form", onerror: function(msg) { alert(msg) } });
            $("#txtNetMuId").formValidator({ defaultvalue: '<%=DefaultValue %>', onshow: "如果需要自己输入,必须为您已购买的公墓,默认请不要输入", onfocus: "公墓编号不能为空", oncorrect: "输入正确" }).inputValidator({ min: 8, max: 8, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "公墓编号长度只能为八位,请确认" })
            .ajaxValidator({
                type: "post",
                url: "../AjaxXml/ValidateNetMuId.aspx",
                pre_proc: function() {
                    var v = 'NewNumber=' + escape($('#txtNetMuId').val()) + '&ram=' + Math.random();
                    return v;
                },
                //processdata:true,
                datatype: "html",
                success: function(data) {
                    if (data == 0) {
                        return true;
                    }
                    else if (data == -1) {
                        this.onerror = "该公墓编号您无权使用";
                        return false;
                    }
                    else if (data == 1) {
                        return true;
                    }
                    else if (data == -2) {
                        this.onerror = "该公墓编号已经使用";
                        return false;

                    }
                    else {
                        this.onerror = "未知错误";
                        return false;
                    }
                },
                buttons: $("#Button1"),
                error: function() { alert("服务器没有返回数据，可能服务器忙，请重试"); },
                onerror: "该公墓编号已使用，请更换!",
                onwait: "正在对公墓编号进行合法性校验，请稍候..."
            }).defaultPassed();
           // $("#txtNetMuId").formValidator({ onshow: "请输入纪念馆名称", onfocus: "纪念馆名称不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "纪念馆名称长度必须在1-30位,请确认" });
           
            
            //$("#txtNetMuName").formValidator({ tipid:"divNetMuNameTip";onshow: "请输入纪念馆名称", onfocus: "纪念馆名称不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "纪念馆名称长度必须在1-30位,请确认" });
            $("#txtNetMuName").formValidator({ tipid: "divNetMuNameTip", onshow: "请输入公墓名称", onfocus: "公墓名称不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "公墓名称两边不能有空符号" }, onerror: "公墓名称长度必须在1-30位,请确认" });
            $("#Txt_UserNa").formValidator({ tipid: "UserNameCheckTip", onshow: "请输入逝者姓氏", onfocus: "逝者姓氏不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 10, empty: { leftempty: false, rightempty: false, emptyerror: "逝者姓氏两边不能有空符号" }, onerror: "逝者姓氏长度必须在1-10位,请确认" });
            $("#Txt_UserName").formValidator({ tipid: "UserNameCheckTip", onshow: "请输入逝者名", onfocus: "逝者名不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 15, empty: { leftempty: false, rightempty: false, emptyerror: "逝者名两边不能有空符号" }, onerror: "逝者名长度必须在1-15位,请确认" });
            $("#Txt_otherName").formValidator({ onshow: "请输入逝者别名", onfocus: "逝者别名不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "逝者别名两边不能有空符号" }, onerror: "逝者别名长度必须在1-30位,请确认" });
            $("#Txt_Race").formValidator({ empty: true, onshow: "逝者民族,可选项", onfocus: "逝者民族,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者民族两边不能有空符号" }, onerror: "逝者民族长度必须在1-20位,请确认" });
            $("#Txt_Occu").formValidator({ empty: true, onshow: "逝者职业,可选项", onfocus: "逝者职业,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者职业两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
            $("#Txt_place").formValidator({ empty: true, onshow: "逝者籍贯,可选项", onfocus: "逝者籍贯,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者籍贯两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
            $("#Txt_Belief").formValidator({ empty: true, onshow: "逝者信仰,可选项", onfocus: "逝者信仰,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者籍贯两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
            $("#Txt_birthyear").formValidator({ onshow: "出生日期不能为空", onfocus: "请输入出生日期", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "出生时间不能为空,请确认" });
            $("#Txt_DeathTime").formValidator({ onshow: "去世时间不能为空", onfocus: "请输入去世时间", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "去世时间不能为空,请确认" });


            $("#Txt_Pwdchange").formValidator({ onshow: "纪念馆的密码不能为空", onfocus: "请输入您纪念馆的密码", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 12, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "纪念馆的密码长度只能为1-12位,请确认" });

            $("#Txt_Pwdchange").attr("readonly", 'readonly').unFormValidator(true);

            $(":radio[name='IsPwd']").click(function() {
                var SelectValue = $("input[name='IsPwd']:checked").val();
                $("#Txt_Pwdchange")[0].value = "";
                if (parseInt(SelectValue) == 1) {
                    $("#Txt_Pwdchange").removeAttr("readonly").unFormValidator(false); //
                    $("#pwdstyle").css({ 'display': 'block' });
                }
                else {
                    $("#Txt_Pwdchange").attr("readonly", 'readonly').unFormValidator(true);
                    $("#pwdstyle").css({ 'display': 'none' });

                }
            });
            //动画速度
            var speed = 500;

            $(":checkbox[name='picThumb']").click(function(event) {

                //取消事件冒泡
                event.stopPropagation();
                //设置弹出层位置
                var offset = $(event.target).offset();
                $("#divPop").css({ top: offset.top - $("#divPop").height() + $(event.target).height() + "px", left: offset.left + 50 + $(event.target).height() });
                //切换弹出层的显示状态
                $("#divPop").toggle(speed);
                if ($("#Txt_UpImg")[0].value != "") {
                    $("#ThumbImg").attr("src", "../" + $("#Txt_UpImg").val());
                }
                else {
                    $("#ThumbImg").attr("src", "../images/nopic.jpg");

                }
            });


            $(":checkbox[name='picTwo_check']").click(function(event) {

                //取消事件冒泡
                event.stopPropagation();
                //设置弹出层位置
                var offset = $(event.target).offset();
                $("#divPopTwo").css({ top: offset.top - $("#divPopTwo").height() + $(event.target).height() + "px", left: offset.left + 50 + $(event.target).height() });
                //切换弹出层的显示状态
                $("#divPopTwo").toggle(speed);
                if ($("#Txt_UppicTwo")[0].value != "") {
                    $("#ThumbImgTwo").attr("src", "../" + $("#Txt_UppicTwo").val());
                }
                else {
                    $("#ThumbImgTwo").attr("src", "../images/nopic.jpg");

                }
            });

            if (parseInt("<%=t %>") == 1) {  //双人
                $("#Txt_SnameTwo").formValidator({ tipid: "Txt_unameTwoTip", onshow: "请输入逝者二的姓氏", onfocus: "逝者二的姓氏不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 10, empty: { leftempty: false, rightempty: false, emptyerror: "逝者二的姓氏两边不能有空符号" }, onerror: "逝者二的姓氏长度必须在1-10位,请确认" });
                $("#Txt_unameTwo").formValidator({ tipid: "Txt_unameTwoTip", onshow: "请输入逝者二的名", onfocus: "逝者二的名不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 15, empty: { leftempty: false, rightempty: false, emptyerror: "逝者二的名两边不能有空符号" }, onerror: "逝者二的名长度必须在1-15位,请确认" });
                $("#Txt_OtherNameTwo").formValidator({tipid:"Txt_OtherNameTwoTip",onshow: "请输入逝者二的别名", onfocus: "逝者二的别名不能为空", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "逝者二的别名两边不能有空符号" }, onerror: "逝者二的别名长度必须在1-30位,请确认" });

                $("#Txt_RaceTwo").formValidator({ empty: true, onshow: "逝者民族,可选项", onfocus: "逝者民族,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者民族两边不能有空符号" }, onerror: "逝者民族长度必须在1-20位,请确认" });
                $("#Txt_OccuTwo").formValidator({ empty: true, onshow: "逝者职业,可选项", onfocus: "逝者职业,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者职业两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
                $("#Txt_placeTwo").formValidator({ empty: true, onshow: "逝者籍贯,可选项", onfocus: "逝者籍贯,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者籍贯两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
                $("#Txt_BeliefTwo").formValidator({ empty: true, onshow: "逝者信仰,可选项", onfocus: "逝者信仰,可选项", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 20, empty: { leftempty: false, rightempty: false, emptyerror: "逝者籍贯两边不能有空符号" }, onerror: "逝者籍贯长度必须在1-20位,请确认" });
                $("#Txt_birthTwo").formValidator({ onshow: "出生日期不能为空", onfocus: "请输入出生日期", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "出生时间不能为空,请确认" });
                $("#Txt_DeathTimeTwo").formValidator({ onshow: "去世时间不能为空", onfocus: "请输入去世时间", oncorrect: "输入正确" }).inputValidator({ min: 1, max: 30, empty: { leftempty: false, rightempty: false, emptyerror: "两边不能有空符号" }, onerror: "去世时间不能为空,请确认" });

            };
            $("#WebEditor1").formValidator({ tipid: "divIntroductionTip", onshow: "请输入生平简介", onfocus: "生平简介不能为空", oncorrect: "输入正确" }).inputValidator({ empty: { leftempty: false, rightempty: false, emptyerror: "生平简介两边不能有空符号" }, onerror: "生平简介不能为空,请确认" });
        });
    
    </script>--%>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Panel ID="palAddArticle" runat="server">
            <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center>
                <tr>
                    <td height="22" align="center" class="title" colspan="3">
                        <b>修改用户信息</b>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>用户名：</strong>
                    </td>
                    <td><asp:Label ID="lblUserName" runat="server" Text="" />
                    </td>
                    <td>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>密码：</strong>
                    </td>
                    <td>
                        <asp:TextBox ID="txtPwd" runat="server" TextMode="Password" Width="305px"/>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>密码问题：</strong>
                    </td>
                    <td colspan="2">
                        
                        <asp:TextBox ID="txtPwdQuestion" runat="server" Width="305px"/>
                        <font color="#ff6600">*</font>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>问题答案：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtPwdAnswer" runat="server" Width="305px"/>
                        <font color="#ff6600">*</font>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>性别：</strong>
                    </td>
                    <td colspan="2">
                        <asp:RadioButtonList ID="rbtnSex" runat="server" RepeatDirection="Horizontal">
                            
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>Email：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtEmail" runat="server" Width="305px" />
                        <font color="#ff6600">*</font><br>
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>主页：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtMyWeb" runat="server" Width="305px" />
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>联系电话：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtNum" runat="server" Width="305px" />
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>QQ：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtQQ" runat="server" Width="305px" />
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>Msn：</strong>
                    </td>
                    <td colspan="2">
                        <asp:TextBox ID="txtMsn" runat="server" Width="305px" />
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>所属地区：</strong>
                    </td>
                    <td colspan="2"><select id="selProvice" name="selProvice" onChange="changeProvince(document.getElementById('selProvice'),document.getElementById('selCity'));">
                                </select>
		
		 <select id="selCity" name="selCity">
                                </select>

                                <script language="javascript" type="text/javascript">
                                    initialize(document.getElementById('selProvice'), document.getElementById('selCity'), "<%=model.Province %>", "<%=model.City %>");
                                </script> 
                    </td>
                </tr>
                <tr class="tdbg">
                    <td width="100" align="right">
                        <strong>用户状态：</strong>
                    </td>
                    <td colspan="2">
                        <asp:RadioButtonList ID="rbtnState" runat="server"  RepeatDirection="Horizontal">
                            <asp:ListItem Text="正常" Value="正常"></asp:ListItem>
                            <asp:ListItem Text="锁定" Value="锁定"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                </td> </tr>
                <tr class="tdbg">
                    <td align="center" colspan="3">
                        <asp:Button runat="server" ID="btnAdd" Text="保  存" 
                            Style="cursor: hand; background-color: #cccccc;" Height="21px" Width="58px" 
                            onclick="btnAdd_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </form>
</body>
</html>
